import { connect } from 'react-redux'
import Cart from '../../../views/Shop/Cart'

function mapStateToProps(state: any) {
    return {
        userInfo: state.user.userInfo,
        cartData: state.detail.cartData
    }
}

function mapDispatchToProps(dispatch: (obj: any) => void) {
    return {
        'SET_DETAIL_CART': (data: any) => {
            dispatch({ type: 'SET_DETAIL_CART', data })
        }
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Cart)